package com.feiyun.erp.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 通用的页面控制器
 */
@Controller
public class PageController {

    //http://localhost:8080/xxx.html  ---> xxx
    @RequestMapping("{page}.html")
    public String toPage(@PathVariable String page){
        return page;
    }

    @RequestMapping("{path}/{page}.html")
    public String toPage(@PathVariable String path,@PathVariable String page){
        return path+"/"+page;
    }
}
